import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import local_get from '@dfeidao/atom-web/local/get';

import fire from '@dfeidao/atom-web/msg/fire';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import msg_error from '@dfeidao/atom-web/msgbox/error';
import msg_success from '@dfeidao/atom-web/msgbox/success';
import storage_get from '@dfeidao/atom-web/storage/get';

// 初始化功能定义
export default async function a003(fd: IFeidaoAiBrowserComponent) {
	const productid = await storage_get('productid');
	const client_type = local_get(fd, 'client_type') as string;
	const group_number = local_get(fd, 'group_number') as string;
	// debugger;

	const res = await nodejs('function-definition/zj-000011/s001', { productid, client_type, group_number });
	if (res === 'success') {
		msg_success('删除成功');
		fd.data.node.classList.add('display-n');
		fire('zj-000001', 'a013', { client_type });
	} else {
		msg_error('删除失败！');
		return;
	}


}
